/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.res0w.SMMS.ds;

import com.res0w.SMMS.factory.DataBaseOperate;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author res0w
 * @since 2009-9-22
 * @version 0.2
 */
public class settingNormal implements BatchSqlInterface {

    public int limitPerPerson = 0;

    public String[] exeSqls() {
        String[] sqls = new String[1];
        sqls[0] = "update setting_normal set " +
                "limitPerPerson='" + limitPerPerson + "'";
        return sqls;
    }

    public void readSqls() {

        try {
            DataBaseOperate db=new DataBaseOperate();
            ResultSet rs = null;
            String sql = null;
            sql = "select limitPerPerson from setting_normal";
            rs = db.dbQueryMuti(sql);
            while (rs.next()) {
                limitPerPerson = Integer.parseInt(rs.getString(1));
            }
            db.dbClosed();
        } catch (SQLException ex) {
            Logger.getLogger(settingNormal.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    /*
     * 测试模块
    public static void main(String[] args){
    DataBaseOperate db=new DataBaseOperate();
    settingNormal sn=new settingNormal();
    sn.readSqls(db);
    System.out.println(sn.limitPerPerson);
    }
     */
}
